package com.taotao.controller;

import com.taotao.pojo.PictureResult;
import com.taotao.service.PictureService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.multipart.MultipartFile;

/**
 * Created by mafuhua on 2017/9/26.
 */
@Controller
public class PictureController {
    @Autowired
    PictureService pictureService;
    @RequestMapping("/pic/upload")
    @ResponseBody
    public PictureResult uploadFile(MultipartFile uploadFile){
        PictureResult pictureResult = pictureService.uploadPic(uploadFile);
        return pictureResult;
    }
}
